﻿<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style type="text/css">
.tb {
	border-collapse:collapse;
}
th {
	background-color: #fffab0;
	font-size: 16px;
}
td, th {
	line-height: 26px;
	border: 1px solid #54076d;
}
h2 {
	width: 500px;
	margin-right: auto;
	margin-left: auto;
}
body{	
	font-size: 10pt;
}
</style>
<script type="text/javascript">

window.onload=function(){
	var data=[["星期一","小组研讨会"],["星期二","和Keith一起面试新员工"],["星期三","接待新客户"],["星期四","小组研讨会"],["星期五","小组研讨会"],["星期六","小组研讨会"],["星期日","啤酒狂欢"]]
	initTable();
	outMessage();

	 function initTable(){
		 for(var i=0;i<data.length;i++){
			 var tr=document.createElement("tr");
			 var td1=document.createElement("td");
			 var td2=document.createElement("td");
			 td1.innerHTML=data[i][0];
			 td2.innerHTML=data[i][1];
			 tr.appendChild(td1);
			 tr.appendChild(td2);
			 var table=document.getElementById("tbMain");
			 table.appendChild(tr);

		 }



	 }

     function outMessage(){
		 var curTime=new Date();
		 var day=curTime.getDay();
		 console.log(day);
		 var d=day>0?day-1:6
		 var str1=data[d][0];
		 var str2=data[d][1];
		 var msg=document.getElementById("msg");
		 msg.innerHTML="今天是"+str1+","+str2



	 }
     






}
</script>

</head>

<body>
<table id="tbMain" width="500" border="0" align="center" cellpadding="0" cellspacing="0" class="tb">
  <tr>
    <th scope="col">日程</th>
    <th scope="col">活动内容</th>
  </tr>
</table>
<h2 id="msg"></h2>
</body>
</html>
